<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" %>
<%@ page import= "java.util.regex.Matcher" 
import = "java.util.regex.Pattern" 
import = "java.util.Random"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<% response.addDateHeader("Expires", 0); %>

<h1>Hello World!</h1>
<%! int hits = 0; %>
You are visitor number
<% synchronized(this) { out.println(++hits); } %>
since the last time the service was restarted.
<p>
This page was last updated:
<%= new java.util.Date().toLocaleString() %>

<%

//Set the email pattern string
Pattern p = Pattern.compile("((?=.*\\d)(?=.*[a-zA-Z])(?=.*\\W).{6,12})");

//Match the given string with the pattern
Matcher m = p.matcher("1d#ppp");

//check whether match is found 


out.println( m.matches());


%>
</body>
</html>